<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script type="text/javascript">
        let user = {
            name:"小范",
            age: 3,
            sex: "男"
        }
        // 将js对象转换成json对象
        let json = JSON.stringify(user);
        console.log(json)
    </script>
</head>
<body>

</body>
</html>